const throttle = (handler,time)=>{
    let timer = null 
    return function()
    {
         if(timer)
    {
        return 
    }
    timer = setTimeout(()=>{
        handler.call(this,...arguments)
        timer =null
    },time)
    }
   
}

export default throttle